function DrawBox( x, y, w, h, col, s )
	if not s then s = 3 end
	
	local r = col
	
	for i = 0, s do
		draw.RoundedBox( 0, x+i, y+i, w-i*2, h-i*2, Color( r.r/i, r.g/i, r.b/i, r.a ) )
	end
	
	surface.SetTexture( up )
	surface.SetDrawColor( Color(r.r,r.g,r.b,r.a/2) )
	surface.DrawTexturedRect( x, y, w, h )	
end

--[[function DrawText( text, font, x, y, col )
	draw.SimpleTextOutlined( text, font, x, y, col, TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP, 1, Color( 0, 0, 0, 255 ) )
end

function DrawTextAligned( text, font, x, y, col, a )
	draw.SimpleTextOutlined( text, font, x, y, col, a, TEXT_ALIGN_TOP, 1, Color( 0, 0, 0, 255 ) )
end]]

function MouseInBox(x,y,w,h)
	local mpx,mpy = gui.MousePos()
	
	if (mpx>x)and(mpx<x+w)and(mpy>y)and(mpy<y+h) then return true end
	return false
end

function Fluctuate(c)
	c = c
	return (math.cos(CurTime()*c)+1)/2
end